package com.kungfu.utils;

/**
 * 返回码枚举类
 */
public enum ResultCodeEnum {
    /**
     * 成功
     */
    SUCCESS("1", "Success"),
    FAIL("-1", "FAIL"),
    PARAM_ERROR("40001", " 请求参数错误"),
    ACCOUNT_NULL("40002", "账号鉴权错误"),
    DATA_NOT_EXIST("40003", "药品数据不存在"),
    CHECK_NOT_OK("40004", "数据检查不通过"),
    ACCOUNT_NOT_EXIST("40005", "转诊单号不存在"),
    ZYH_NOT_EXIST("40006", "住院号不存在"),
    ZZD_IS_EXIST("40007", "该转诊单已生效"),
    USER_TYPE_ERROR("40008", "用户类别不支持"),
    NOT_ALLOW_JS("40009","患者住院期间不允许进行门诊结算"),
    NOT_EXIST_PATIENT("40010","不存在该患者"),
    ZZD_NOT_EXIST("40011","转诊单不存在，请联系华科工作人员"),
    NO_ALLOW_ZY_TO_ZM("40012","住院期间不允许开门诊转诊单"),
    NO_ALLOW_ZM_TO_ZY_ST("40013","学生不允许门诊转住院"),
    ACCESSTOKEN_BLANK("mall-404", "token为空"),
    ACCESSTOKEN_INVALID("mall-405", "token非法"),
    SERVER_INTERNAL_ERROR("50000", "server internal error"),
    DB_OPERATE_ERROR("50001", "DB error"),
    LOW_STOCKS("mall-502", "库存不足"),
    OTHER_ERROR("50002", "other error"),ZZD_STATUS_ERROR("50003","转诊单状态异常");


    private String code;
    private String desc;

    ResultCodeEnum(String code, String desc) {
        this.code = code;
        this.desc = desc;
    }

    public String getCode() {
        return code;
    }

    public String getDesc() {
        return desc;
    }

    public static void main(String[] args) {
        System.out.println(ResultCodeEnum.SUCCESS.getCode() + " - " + ResultCodeEnum.SUCCESS.getDesc());
        System.out.println(ResultCodeEnum.SUCCESS.getCode());
    }

}
